September 28, 2021

1 Preprocess

1.1 Concate electricity/gas consumption data from 2017 to 2021 together ssing loop

The number of rows of electricity consumption data

## [1] 143300

The head of electricity consumption data

## # A tibble: 6 x 8
##   ZIPCODE MONTH  YEAR CUSTOMERCLASS  COMBINED TOTALCUSTOMERS TOTALKWH AVERAGEKWH
##     <dbl> <dbl> <dbl> <chr>          <chr>             <dbl>    <dbl>      <dbl>
## 1   93117     1  2017 Elec- Agricul~ Y                     0        0         NA
## 2   93117     2  2017 Elec- Agricul~ Y                     0        0         NA
## 3   93117     3  2017 Elec- Agricul~ Y                     0        0         NA
## 4   93203     1  2017 Elec- Agricul~ Y                     0        0         NA
## 5   93203     2  2017 Elec- Agricul~ Y                     0        0         NA
## 6   93203     3  2017 Elec- Agricul~ Y                   158  5041211      31906

The number of rows of gas consumption data

## [1] 63891

The head of gas consumption data

## # A tibble: 6 x 8
##   ZIPCODE MONTH  YEAR CUSTOMERCLASS   COMBINED TOTALCUSTOMERS TOTALTHM AVERAGETHM
##     <dbl> <dbl> <dbl> <chr>           <chr>             <dbl>    <dbl>      <dbl>
## 1   92304     1  2017 Gas- Commercial Y                     0        0         NA
## 2   92304     2  2017 Gas- Commercial Y                     0        0         NA
## 3   92304     3  2017 Gas- Commercial Y                     0        0         NA
## 4   92365     1  2017 Gas- Commercial Y                     0        0         NA
## 5   92365     2  2017 Gas- Commercial Y                     0        0         NA
## 6   92365     3  2017 Gas- Commercial Y                     0        0         NA

1.2 Regroup by CUSTOMERCLASS (Residential & Commercial) and Convert Units

1 kWh = 3.412 kBTU 1 Therm = 99.976 kBTU

The number of rows of residential electricity and gas consumption data

## [1] 108

The head of residential electricity and gas consumption data

## # A tibble: 6 x 7
## # Groups:   YEAR, CUSTOMERCLASS [1]
##    YEAR MONTH CUSTOMERCLASS       TOTALKBTU TOTALCUSTOMERS AVERAGEKBTU DATE     
##   <dbl> <dbl> <chr>                   <dbl>          <dbl>       <dbl> <yearmon>
## 1  2017     1 Elec- Residential 9200909401.        4427009       2078. Jan 2017 
## 2  2017     2 Elec- Residential 7129050870.        4429320       1610. Feb 2017 
## 3  2017     3 Elec- Residential 6850869995.        4432096       1546. Mar 2017 
## 4  2017     4 Elec- Residential 6271623496.        4437095       1413. Apr 2017 
## 5  2017     5 Elec- Residential 7065078521.        4438946       1592. May 2017 
## 6  2017     6 Elec- Residential 8924453902.        4437910       2011. Jun 2017

The number of rows of commercial electricity and gas consumption data

## [1] 108

The head of commercial electricity and gas consumption data

## # A tibble: 6 x 7
## # Groups:   YEAR, CUSTOMERCLASS [1]
##    YEAR MONTH CUSTOMERCLASS      TOTALKBTU TOTALCUSTOMERS AVERAGEKBTU DATE     
##   <dbl> <dbl> <chr>                  <dbl>          <dbl>       <dbl> <yearmon>
## 1  2017     1 Elec- Commercial 8591870424.         312242      27517. Jan 2017 
## 2  2017     2 Elec- Commercial 7460030562.         312327      23885. Feb 2017 
## 3  2017     3 Elec- Commercial 7945749316.         312586      25419. Mar 2017 
## 4  2017     4 Elec- Commercial 7712923546.         313499      24603. Apr 2017 
## 5  2017     5 Elec- Commercial 8437059549.         313795      26887. May 2017 
## 6  2017     6 Elec- Commercial 8800188559.         313740      28049. Jun 2017

2 Plot

Residential Electricity & Gas Usage From 2017.01 to 2021.06

Commercial Electricity & Gas Usage From 2017.01 to 2021.06

3 Analysis

COVID -19 broke out in early 2020 and is still popular around the world. For the convenience of analysis, I approximately think that the whole year of 2020 is the epidemic year, and before 2020 is the normal year. Take 2019 as the normal year (Baseline)

3.1 Periodicity

From the figures plotted before, we can see that the trends of energy consumption (electricity & gas) are periodic. Residential and commercial energy consumption arrive their peaks at the start and end of one year and valleys in the middle of one year. Basically, the epidemic has little impact on this periodicity.

3.2 Difference

From the two figures above, we can see that the epidemic decreased the commercial energy consumption obviously. But in 2021 (still COVID year), the commercial energy consumption returns to normal. This might because the proportion of vaccination is relatively high, and the industries gradually return to work and production. In order to explore the effect of COVID-19 more clearly, especially for residential energy consumption, I made two extra plots. The first figure below is obtained by subtracting the residential energy consumption data in 2020 from the residential energy consumption data in 2019. The second figure below is obtained by subtracting the commercial energy consumption data in 2020 from the commercial energy consumption data in 2019.From these two figures we can see that comparing to the baseline (normal), generally, the residential energy consumption increased and the commercial energy consumption decreased. I think the change of residential energy consumption results from during the epidemic, people stayed at home for a long time. Thus, more electricity and gas are used.